import { httpDelete, httpGet, httpPost, httpPut } from "@/utils/http";

export type userLevelItemLimit = {
    _id?: string,
    is_show: number,
    name: string,
    grade: string,
    discount: string,
    exp: string,
    icon?: string,
    bg_image?: string,
}

export function addUserLevelApi(data: object) {
    return httpPost('/userGrade/add', data);
}
export function getUserLevelApi(data?: object) {
    return httpPost('/userGrade/find', data);
}
export function updateUserLevelApi(data: object) {
    return httpPut('/userGrade/update', data);
}
export function deleteUserLevelApi(data: object) {
    return httpDelete('/userGrade/remove', data);
}
// 获取一个用户等级数据的详情
export const getUserGradeByIdApi = (data: object) => {
    return httpGet('/userGrade/getById', data)
}
